package com.ctgu.rabbitmq.rabbitmq.exchange.defaultExchange;

import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ ClassName DefaultExchangeConsumer
 * @ Author Alex2
 * @ Date 2025/8/14 15:40
 **/
@Log4j2
@Component
public class DefaultExchangeConsumer {

    private static final String TAG = "Alex";

    // 监听默认交换机的队列
    @RabbitListener(queues = DefaultExchangeConfig.QUEUE_DEFAULT)
    public void receive(String message) {
        log.debug("{} : 默认交换机队列收到消息 : {}", TAG, message);
    }
}
